package com.tm.fundament;

import com.googlecode.objectify.ObjectifyService;
import com.tm.pojo.Instrument;
import com.tm.pojo.Price;

public class Initializer {
	private static Initializer singleton = null;
	private boolean initialized = false;
	
	private Initializer() {
	}
	
	public static Initializer getInstance() {
		if (singleton == null) {
			singleton = new Initializer();
		}
		return singleton;
	}
	
	public void init() {
		if (!initialized) {
			ObjectifyService.register(Instrument.class);
			ObjectifyService.register(Price.class);
			initialized = true;
		}
	}	
}
